//
//  AppMacro.h
//  much
//
//  Created by weijunjie on 2018/12/29.
//  Copyright © 2018年 iOS. All rights reserved.
//

#ifndef AppMacro_h
#define AppMacro_h

//控制网络请求环境 1为正式环境 0为测试环境
#define showDivRequestUrl 0

// 渠道
#define kChannelValue @"ooooLw"

#ifdef DEBUG
#define NSLog(...) printf("[%s] %s [第%d行]: %s\n", __TIME__ ,__PRETTY_FUNCTION__ ,__LINE__, [[NSString stringWithFormat:__VA_ARGS__] UTF8String])
#else
#define PPLog(...)
#endif

#define __weakConfigure __weak typeof(self) __weakSelf = self;
#define __strongConfigure __strong typeof(self) __strongSelf = __weakSelf;

// 占位图
#define NewStoreDefault [UIImage imageNamed:@"itemDefault"] // 商品

// 字体
#define ICONFONT(S) [UIFont fontWithName:@"iconfont" size:S]
#define CalculateFontSize(fontSize) ([UIScreen mainScreen].scale > 2) ? (fontSize + 1) : fontSize
#define APPFONT(fontSize) [UIFont systemFontOfSize:CalculateFontSize(fontSize)]
#define APPBOLDPINGFANGFONT(fontSize) [UIFont boldSystemFontOfSize:CalculateFontSize(fontSize)]

#define N_MORE @"\uE695" //更多
#define UP_SELECTED @"\uE612"
#define UP @"\uE611"
#define COMMENT @"\uE61d"
#define CANCEL @"\uE615"
#define DELETE_NO_CIRCLE @"\uE61C"
#define TEXT_EDIT @"\uE60D"
#define SURE @"\uE620"
#define SOCIAL @"\uE600"
#define BROADCAST @"\uE63a"
#define ARROW_RIGHT @"\uE637"
#define ARROW_LEFT @"\uE618"
#define AWARD @"\uE609"
#define WRITE @"\uE60a"
#define DRAFT @"\uE60b"
#define CLOCK @"\uE60c"
#define SEARCH @"\uE60e"
#define BRAND @"\uE63b"
#define FOOT @"\uE61a"
#define ORDER @"\uE602"
#define STORES @"\uE619"
#define LOGO @"\uE62c"
//@"\uE653"   @"\uE60f"
#define SHARE @"\uE653"
#define ADD @"\uE61b"
#define CLOSE @"\uE61c"
#define BAG @"\uE608"
#define LOGOUT @"\uE62b"
#define ADDR @"\uE625"
#define BASE @"\uE606"
#define SETS @"\uE607"
#define ALBUM @"\uE605"
#define PHOTOALBUM @"\uE64f"
#define BUSNIESS @"\uE608"
#define WRITER @"\uE62a"
#define COMMUNITY @"\uE64b"
#define ORDER @"\uE602"
#define LIKE @"\uE601"
#define RecommendBusinessman @"\uE6c9"
#define COLLECT_N @"\uE613"
#define COLLECT_D @"\uE614"
#define SCORE @"\uE603"
#define PLAYER @"\uE642"
#define CASH @"\uE640"
#define MENU @"\uE633"
#define MALL @"\uE632"
#define PERSON @"\uE634"
#define FEEDBACK @"\uE644"
#define OnlineAsk @"\uE630"
#define ABOUT @"\uE643"
#define REFRESH @"\uE63c"
//#define STROKESTAR @"\uE613"
//#define FILLSTAR @"\uE614"
#define SELECTED @"\uE645"
#define DESELECTED @"\uE646"
#define ARROW_RIGHT_BIG  @"\uE647"
#define ASC @"\uE649"
#define HELP @"\uE656"
#define NEWSHARE @"\uE653"
#define INVITE @"\uE657"
#define INTEGRAL @"\uE655"
#define ARTIFICICALSERVICE @"\uE662"
//未选中 空圈
#define SELECT_N @"\uE678"
//选中
#define SELECT_D @"\uE677"
//店铺
#define N_STORE @"\uE693"
//入住
#define N_CHECK @"\uE729"
//下拉
//#define N_DOWNARROW @"\uE68f"
#define N_DOWNARROW @"\uE67b"

// 拼团中
#define N_DOWNGROUPPURSEING @"\uE6dc"
// 拼团已成团
#define N_DOWNGROUPPURSEFINISH @"\uE6dd"
// 拼团失败
#define N_DOWNGROUPPURSEFAIL @"\uE6df"

//留言
#define N_LEAVEMSG @"\uE6b2"
//分享
#define N_SHARE @"\uE697"
//赞
//#define N_PRAISE_N @"\uE651"
//#define N_PRAISE_D @"\uE652"

#define N_PRAISE_N @"\uE6a7"
#define N_PRAISE_D @"\uE6a7"
//历史
#define N_History @"\uE728"
//删除
#define N_DELETE @"\uE639"
// 消息消息中心
#define N_MessageCenter @"\uE62c"
#define NoSearchResultsIFString @"\uE6a2"
#define NetworkTimeoutIFString @"\uE6a3"
#define RequestDataGoBackIFString @"\uE6e7"
#define ShoppingCartEmptyIFString @"\uE6c8"
#define ShoppingListEmptyIFString @"\uE642"
#define RecommendBusinessmanEmptyIFString @"\uE693"
#define MessageEmptyIFString @"\uE62c"
#define EventEmptyIFString @"\uE965"
#define MySubscriptionListIFString @"\uE6bc"
#define CollectionListIFString @"\uE704"
#define ShopCollectionListIFString @"\uE6b9"
#define IdentityInfoListIFString @"\uE6e5"
#define StoreCouponsListIFString @"\uE6ba"
#define StoreListIFString @"\uE6c2"
#define StoreAppraiseEmptyIFString @"\uE6c3"
#define StoreSearchArticleOrAuthorEmptyIFString @"\uE6c6"
#define TASubscriptionListEmptyIFString @"\uE6d2"
#define GoodsAndCashInfoListIFString @"\uE6e6"

// 尺寸比例缩放
#define CalculateSuitableSize(n) (n) / 375.0 * ScreenWidth
#define WIDTH [UIScreen mainScreen].bounds.size.width / 375.0
//屏幕尺寸
#define ScreenWidth CGRectGetWidth([[UIScreen mainScreen] bounds])
#define ScreenHeight CGRectGetHeight([[UIScreen mainScreen] bounds])

/** 图片获取 */
#define IMAGE(imageName) [UIImage imageWithContentsOfFile:[[NSBundle mainBundle] pathForAuxiliaryExecutable:imageName]]
#define IMAGE_NAME(imageName) [UIImage imageNamed:imageName]

#if __IPHONE_OS_VERSION_MIN_REQUIRED >= 70000
#define TextSize(_text, _font) [_text length] > 0 ? [_text sizeWithAttributes:@{NSFontAttributeName:_font}] : CGSizeZero;
#else
#define TextSize(_text, _font) [_text length] > 0 ? [_text sizeWithFont:_font] : CGSizeZero;
#endif

#if __IPHONE_OS_VERSION_MIN_REQUIRED >= 70000
#define TextSize_MutiLine(_text, _font, _maxSize) [_text length] > 0 ? [_text boundingRectWithSize:_maxSize options:(NSStringDrawingUsesLineFragmentOrigin) attributes:@{NSFontAttributeName:_font} context:nil].size : CGSizeZero;
#else
#define TextSize_MutiLine(_text, _font, _maxSize) [_text length] > 0 ? [_text sizeWithFont:_font constrainedToSize:_maxSize lineBreakMode:NSLineBreakByWordWrapping] : CGSizeZero;
#endif

// 颜色
#define HEXCOLOR(rgbValue) [UIColor colorWithRed:((float)((rgbValue & 0xFF0000) >> 16))/255.0 green:((float)((rgbValue & 0xFF00) >> 8))/255.0 blue:((float)(rgbValue & 0xFF))/255.0 alpha:1.0]
#define HEXCOLORALPHA(rgbValue,r) [UIColor colorWithRed:((float)((rgbValue & 0xFF0000) >> 16))/255.0 green:((float)((rgbValue & 0xFF00) >> 8))/255.0 blue:((float)(rgbValue & 0xFF))/255.0 alpha:(float)(r)]
#define RGBACOLOR(r,g,b,a) [UIColor colorWithRed:(r)/255.0 green:(g)/255.0 blue:(b)/255.0 alpha:(a)]
#define Color80 RGBACOLOR(80, 80, 80, 1) // 文字灰色（二级副标题）
#define Color244 RGBACOLOR(244, 244, 244, 1) // 商城浅灰色（页面最底层） 统一整个APP的背景颜色
#define Color217 RGBACOLOR(217, 217, 217, 1) // 商城灰色（分隔线等）
#define Color140 RGBACOLOR(140, 140, 140, 1) // 灰色（三级副标题）
#define Color34 RGBACOLOR(34, 34, 34, 1) // 深黑（标题）
#define Color175030 RGBACOLOR(175, 0, 30, 1) // 红色
#define Color0108183 RGBACOLOR(0, 108, 183, 1) // 蓝色
#define Color159 RGBACOLOR(159, 159, 159, 1) // 商品详情划线价
#define Color100 RGBACOLOR(100, 100, 100, 1) // 导航栏右侧按钮
#define Color53 RGBACOLOR(53, 53, 53, 1)
#define Color20812847 RGBACOLOR(208, 128, 47, 1) // h粉黄色

// 提示
#define InVaildDataTipMsg  @"服务器数据无效，请稍后重试"

// keys
#define UserInfoKey @"com.yuntu.much"

/** 通知 */
#define NOTIFY_HANDLE [NSNotificationCenter defaultCenter]
/** 退出登录 */
#define UserLogoutNotification @"userLogoutNotification"

#endif /* AppMacro_h */
